package o2o.utils.resp;

/**
 * Created with IntelliJ IDEA.
 *
 * @User: @Created by yangtk
 * @Date: @Date 2020/11/11 19:38
 * @Email: yangtongkuan@qq.com
 * @To change this template use File | Settings | File Templates.
 * @desc 异常码
 */
public enum EResultCode {

    /**
     * 状态码
     * 200 请求成功
     * 1000-1100, 用户信息错误
     * 2000-2999， 系统错误
     * 3000-3999， 租户信息错误
     */

    SUCCESS(200, "请求操作成功"),
    INVALID_TENANT(3000, "无效的租户信息"),
    SYS_ERROR(2000, "系统错误"),
    NOT_LOGIN(1000, "当前帐号失效，请重新登录"),
    LOGIN_FAILURE(1001, "登录失效,请重新登录");

    private int code;
    private String message;

    EResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public EResultCode setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public EResultCode setMessage(String message) {
        this.message = message;
        return this;
    }
}
